//
//  HHConversationModel.h
//  HHChatKit
//
//  Created by Henry on 2021/5/10.
//

#import <Foundation/Foundation.h>
#import "HHUserModel.h"
#import "HHConversationCellConfig.h"

NS_ASSUME_NONNULL_BEGIN

/// 会话类型
typedef NS_ENUM(NSInteger, HHConversationType) {
    HHConversationTypePersonal,     // 个人
    HHConversationTypeGroup,        // 群聊
    HHConversationTypePublic,       // 公众号
    HHConversationTypeServerGroup,  // 服务组（订阅号、企业号）
    HHConversationTypeNoNet,        // 无网络
    HHConversationTypeSystem,       // 系统
};

@interface HHConversationModel : NSObject

@property (nonatomic, copy) NSString *identifier;

@property (nonatomic, copy) NSString *name;
@property (nonatomic, copy) NSString *msg;
@property (nonatomic, copy) NSString *time;

@property (nonatomic, copy) NSString *icon;

@property (nonatomic, copy) NSString *type;

@property (nonatomic, strong) UIImage *iconImage;

@property (nonatomic, strong) NSArray <HHUserModel *> *members;

/// 未读数
@property (nonatomic, assign) NSInteger unread;
/// 置顶
@property (nonatomic, assign) BOOL top;

/// 会话类型
@property (nonatomic, assign) HHConversationType convType;

@property (nonatomic, strong, readonly) NSString *badgeValue;
@property (nonatomic, assign, readonly) BOOL isRead;

// 配置
@property (nonatomic, strong) HHConversationCellConfig *config;

- (instancetype)initWithType:(HHConversationType)convType;

- (NSString *)getConversationTitle;

- (void)resetConversationImage;

@end

NS_ASSUME_NONNULL_END
